package com.zzyy.study.service;

import com.zzyy.study.entities.Customer;
import com.zzyy.study.mapper.CustomerMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * @auther zzyy
 * @create 2024-01-20 18:18
 */
@Service
public class CustomerService
{
    @Resource
    private CustomerMapper customerMapper;

    public Customer getCustomerById(Integer id)
    {
        return customerMapper.selectByPrimaryKey(id);
    }

    public int add(Customer customer)
    {
        return customerMapper.insertSelective(customer);
    }
}
